home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / iCutsceneUtilities.h < prev    next >
Text File  |  2002-01-14  |  7KB  |  169 lines

  1. //
  2. // (c) 1998-9 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // iCutsceneUtilities.h
  5. //
  6. // Compiler-generated export header for package "iCutsceneUtilities"
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /iwar2/resource/scripts/include/iCutsceneUtilities.h 10    3/09/00 14:58 Alex $
  11. //
  12.  
  13. // Dependencies ////////////////////////////////////////////////////////////////
  14.  
  15. uses iShip, iSim, Group, Set, Task;
  16.  
  17. // Enumerated types ////////////////////////////////////////////////////////////
  18.  
  19. enum eAxis {
  20.     AXIS_x,
  21.     AXIS_y,
  22.     AXIS_z
  23. };
  24.  
  25. enum eStationModuleFind {
  26.     SMF_Comms,
  27.     SMF_Engineering,
  28.     SMF_Docking_Arm,
  29.     SMF_Pod_Spewer,
  30.     SMF_Habitat,
  31.     SMF_Hotel,
  32.     SMF_Processing_Plant
  33. };
  34.  
  35. // Functions ///////////////////////////////////////////////////////////////////
  36.  
  37. // Essential Functions
  38. // -------------------
  39.  
  40. //
  41. // HandleAbort( htask cutscene_task )
  42. //
  43. // usage: HandleAbort( start my_cut_scene_task() );
  44. //
  45. // cleans up after your cutscene, and allows player to use SPACE key to abort your cutscene
  46. //
  47. prototype bool iCutsceneUtilities.HandleAbort( htask cutscene_task ); // manages user abort, as well as cleanup
  48.  
  49. //
  50. // EnablePlayerAutoPilot()
  51. // DisablePlayerAutoPilot()
  52. //
  53. // allows you to manipulate the player ship as an AI ship
  54. // safe to call more than once, if you are not sure
  55. // DisablePlayerAutopilot is called automatically when your cutscene ends (if it was wrapped by HandleAbort)
  56. // 
  57. prototype hship iCutsceneUtilities.EnablePlayerAutopilot(); // allows you to manipulate the player ship as an AI ship
  58. prototype iCutsceneUtilities.DisablePlayerAutopilot(); // used to deactivate the previous.
  59.  
  60. //
  61. // GetKillGroup();
  62. //
  63. // returns a special group to which you should add sims and groups which should exist only for the duration of the cutscene.
  64. // this group is cleaned up automatically when the cutscene ends (if it was wrapped by HandleAbort)
  65. //
  66. // Note: you should add the highest level group to the killgroup, otherwise when you add stuff to other groups, 
  67. // they will be removed from the kill group, and vice versa
  68. //
  69. prototype hgroup iCutsceneUtilities.GetKillGroup(); // returns the cutscene kill group - to which you should add temporary sims
  70.  
  71. // Simple Utilities to save you time
  72. // ---------------------------------
  73.  
  74. //
  75. // hship CreateGhostShip() 
  76. //
  77. // creates and returns a special indestructible and invisible ghost ship
  78. // for use as a piloted dolly, and by EnablePlayerAutopilot to put the player in
  79. // includes free pilot - just plug it in and go...
  80. //
  81. prototype hship iCutsceneUtilities.CreateGhostShip(); 
  82.  
  83. //
  84. // Watch(hsim from, hsim to);
  85. //
  86. // just setup the direction to look from (the position of) one sim to another
  87. // use with CreateGhostShip to create a simple moving viewpoint
  88. //
  89. prototype iCutsceneUtilities.Watch(hsim from, hsim to);
  90.  
  91. //
  92. // BuzzCamera(...)
  93. //
  94. // sets the focus to a position relative to the current position of another sim
  95. // uses dolly camera, which it returns
  96. // assumes ships will continue to fly in the direction they were going in
  97. // this can be achieved by setting PointAt, GiveApproachOrder for the same sim
  98. // the camera is aplced distanceahead of the current direction of the flyer
  99. //
  100. prototype hsim iCutsceneUtilities.BuzzCamera(hsim flying, float xoffset, float yoffset, float zdistanceahead );
  101.  
  102. // Complex Path Utilities
  103. // ----------------------
  104. prototype task iCutsceneUtilities.FollowRouteTask( hsim follower, hgroup route, float completion_ratio, float time_step, int loop_count, int index /* start index */);
  105. prototype iCutsceneUtilities.FollowRoute( hsim follower, hgroup route, float completion_ratio, float time_step, int loop_count, int index /* start index */);
  106. prototype hgroup iCutsceneUtilities.BuildCircularPath(hsim center, eAxis axis, float radius, float start_angle, float end_angle, int count);
  107.  
  108. // Predefined Path Utilities
  109. // -------------------------
  110.  
  111. // have a look at the source to these if you want to find out how to build your own
  112.  
  113. prototype iCutsceneUtilities.OrbitSim(hsim look_from, hsim look_at, hsim moves, hsim move_around, string caption, eAxis axis, float radius, float start_angle, float end_angle);
  114.  
  115. // Death Script Functions
  116. // ----------------------
  117.  
  118. //
  119. // SetupDirectedDeath(hobject directed_death_object, hsim speaker, string speaker_name, string obituary_or_last_words, string epitaph, bool end_game) 
  120. //
  121. // Setup a directed death for a sim
  122. // normally used for (and instead of other functions providing) a 'mission critical' sim - set end_game to true if this is the case
  123. //
  124. // <end_game>: if applied to a group, will be called if any ONE member of the group dies (contrast SetupDirectedGroupDeath)
  125. // do not use in combination with SetupDirectedGroupDeath on same sims
  126. //
  127. // <speaker> and <speaker_name> : are used to say an <obituary_or_last_words>, 
  128. //        either by the dying sim (set speaker = none and speaker_name = "") , 
  129. //        or some other, eg Clay (in which case, use like iConverstaion.Oneliner)
  130. // 
  131. // epitaph : the caption for the directed movie
  132. prototype iCutsceneUtilities.SetupDirectedDeath(hobject directed_death_object, hsim speaker, string speaker_name, string obituary_or_last_words, string epitaph, bool end_game);
  133.  
  134. //
  135. // SetupDirectedGroupDeath(hobject directed_death_object, hsim speaker, string speaker_name, string obituary_or_last_words, string epitaph, bool end_game)
  136. //
  137. // Setup a directed death for a group
  138. // normally used for a group of sims where death of the complete group (not just one or two) will fail the mission
  139. //
  140. // <end_game>: end the game forcibly after the direction
  141. // do not use in combination with SetupDirectedDeath on same sims
  142. //
  143. // <speaker> and <speaker_name> : are used to say an <obituary_or_last_words>, 
  144. //        either by the dying sim - the last member of the group (set speaker = none and speaker_name = "") , 
  145. //        or some other, eg Clay (in which case, use like iConverstaion.Oneliner)
  146. // 
  147. // epitaph : the caption for the directed movie
  148. //
  149. // only works properly for flat groups!
  150. // this function will accept sims, but this is for recursion only, and should not be used by the level scripter
  151. prototype iCutsceneUtilities.SetupDirectedGroupDeath(hobject directed_death_object, hsim speaker, string speaker_name, string obituary_or_last_words, string epitaph, bool end_game);
  152.  
  153. // Station Utilities - will go in iUtilities soon
  154. // -----------------
  155.  
  156. prototype set iCutsceneUtilities.GetStationModules( hsim station );
  157. // returns a set containing all the modules of the current station
  158.  
  159. prototype set iCutsceneUtilities.GetThingsCalled( set in, string name );
  160. // returns the first thing with the specified name in the set
  161.  
  162. prototype hisim iCutsceneUtilities.FindStationModule( hsim station, eStationModuleFind module_type );
  163. // finds first station module of the specified type
  164. //
  165. // note: this function will need to be updated when station types change!
  166. // it may also have problems after localisation! - the names may change to keys etc.
  167.  
  168. // EOF /////////////////////////////////////////////////////////////////////////
  169.